//
//  MyInfoTableViewCell.m
//  eshow
//
//  Created by Hisoka on 15/11/17.
//  Copyright © 2015年 Hisoka. All rights reserved.
//

#import "MyInfoTableViewCell.h"

@implementation MyInfoTableViewCell

- (id) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];

    if (self) {
        self.titleLB = [UILabel newAutoLayoutView];
        [self.contentView addSubview:_titleLB];
        
        [_titleLB autoAlignAxis:ALAxisHorizontal toSameAxisOfView:self.contentView];
        [_titleLB autoPinEdge:ALEdgeLeft toEdge:ALEdgeLeft ofView:self.contentView withOffset:10];
        [_titleLB autoSetDimensionsToSize:CGSizeMake(40, 20)];

        self.badgeLB = [UILabel newAutoLayoutView];
        [self.contentView addSubview:_badgeLB];
        
        [_badgeLB autoAlignAxis:ALAxisHorizontal toSameAxisOfView:self.contentView];
        [_badgeLB autoPinEdge:ALEdgeRight toEdge:ALEdgeRight ofView:self.contentView withOffset:-20];
        [_badgeLB autoSetDimensionsToSize:CGSizeMake(150, 20)];
        _badgeLB.textColor = GRAY_COLOR;
        _badgeLB.textAlignment = NSTextAlignmentRight;
        
        self.signLB = [UILabel newAutoLayoutView];
        [self.contentView addSubview:_signLB];
        
        [_signLB autoPinEdge:ALEdgeTop toEdge:ALEdgeTop ofView:self.contentView withOffset:10];
        [_signLB autoPinEdge:ALEdgeLeft toEdge:ALEdgeLeft ofView:self.contentView withOffset:10];
        [_signLB autoSetDimensionsToSize:CGSizeMake(80, 20)];
        
        self.signBakLB = [UILabel newAutoLayoutView];
        [self.contentView addSubview:_signBakLB];
        
        [_signBakLB autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:_signLB withOffset:10];
        [_signBakLB autoPinEdge:ALEdgeLeft toEdge:ALEdgeLeft ofView:self.contentView withOffset:10];
        [_signBakLB autoSetDimensionsToSize:CGSizeMake(ScreenWidth - 40, 40)];
        _signBakLB.textColor = GRAY_COLOR;
        _signBakLB.numberOfLines = 0;
        _signBakLB.lineBreakMode = NSLineBreakByWordWrapping;
        _signBakLB.font = [UIFont systemFontOfSize:14.0f];
        
        self.avatarImg = [UIImageView newAutoLayoutView];
        [self.contentView addSubview:_avatarImg];
        
        [_avatarImg autoAlignAxis:ALAxisHorizontal toSameAxisOfView:self.contentView];
        [_avatarImg autoPinEdge:ALEdgeRight toEdge:ALEdgeRight ofView:self.contentView withOffset:-40];
        [_avatarImg autoSetDimensionsToSize:CGSizeMake(80, 80)];
        _avatarImg.layer.masksToBounds = YES;
        _avatarImg.layer.cornerRadius = 40;
        _avatarImg.backgroundColor = GRAY_COLOR;
        
    }
    
    return self;
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
